package UMC.Web.UI;

import UMC.Web.UICell;
import UMC.Web.UIClick;
import UMC.Web.WebMeta;

public class UIImageTextDescQuantity extends UICell {
    public UIImageTextDescQuantity(String src, String title, String desc) {
        this(new WebMeta().put("desc", desc, "title", title, "src", src));


    }

    public UIImageTextDescQuantity imageClick(UIClick click) {

        this.data.put("image-click", click);
        return this;
    }

    /// <summary>
/// 数据减少事件
/// </summary>
/// <param name="click"></param>
/// <returns></returns>
    public UIImageTextDescQuantity decreaseClick(UIClick click) {

        this.data.put("decrease-click", click);
        return this;
    }

    /// <summary>
/// 数据增加事件
/// </summary>
/// <param name="click"></param>
/// <returns></returns>
    public UIImageTextDescQuantity increaseClick(UIClick click) {

        this.data.put("increase-click", click);
        return this;
    }

    public UIImageTextDescQuantity() {
        this(new WebMeta());

    }

    public UIImageTextDescQuantity(WebMeta data) {
        this.data = data;

    }

    public UIImageTextDescQuantity quantity(int quantity) {
        this.data.put("Quantity", quantity);
        return this;
    }

    public UIImageTextDescQuantity src(String src) {
        this.data.put("src", src);
        return this;
    }

    public UIImageTextDescQuantity title(String title) {
        this.format("title", title);
        return this;
    }

    public UIImageTextDescQuantity desc(String desc) {
        this.format("desc", desc);
        return this;
    }

    WebMeta data;

    @Override
     public WebMeta data() {
        return data;
    }

    @Override
    public String type() {
        return "ImageTextDescQuantity";
    }
}